import axios from '@/utils/request';

// 登录
export const login = (params) => {
  return axios.post('/user/api/user/accountLogin', {
    ...params,
  });
};

export const smsLogin = (params) => {
  return axios.post('/user/api/user/smsLogin', {
    ...params,
  });
};
// 注册
export const smsRegister = (params) => {
  return axios.post('/user/api/user/smsRegister', {
    ...params,
  });
};

// 登出
export const logout = (params) => {
  return axios.post('/user/api/user/logout', {
    ...params,
  });
};

// 获取验证码
export const getSmsCode = (params) => {
  return axios.post('/shop/api/sendSms', {
    ...params,
  });
};

// 修改密码
export const resetPassword = (params) => {
  return axios.post('/user/api/user/resetPassword', {
   ...params,
  });
};

// 获取用户信息
export const getUserInfo = (params) => {
  return axios.get('/user/api/user/profile', {
    params,
  });
};
